package com.jiaai.cloud.chatroom.entity;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.jiaai.cloud.gift.entity.TLiveGiftType;
import com.jiaai.cloud.user.entity.TUser;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 聊天室
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-01
 */
@TableName("t_chat_room")
public class TChatRoom extends Model<TChatRoom> {

    private static final long serialVersionUID = 1L;
	@TableId(value="roomId", type= IdType.AUTO)
	private Long roomId;
    /**
     * 房间名称
     */
	private String title;
    /**
     * 房间首图
     */
	private String imgUrl;
    /**
     * 栏目Id
     */
	private Long columnId;
    /**
     * 1正常  -1冻结
     */
	private Integer status;
    /**
     * 所有者
     */
	private String userId;
    /**
     * 创建时间
     */
	@JSONField(format = "YYYY-MM-dd")
	private Date time;

	@TableField(exist = false)
	private List<TChatRoomColumn> roomColumnList;

	@TableField(exist = false)
	private List<TChatRoomMember> roomMemberList;

	@TableField(exist = false)
	private List<TUser> tUserList;


	public List<TChatRoomMember> getRoomMemberList() {
		return roomMemberList;
	}

	public void setRoomMemberList(List<TChatRoomMember> roomMemberList) {
		this.roomMemberList = roomMemberList;
	}

	public List<TUser> gettUserList() {
		return tUserList;
	}

	public void settUserList(List<TUser> tUserList) {
		this.tUserList = tUserList;
	}

	public List<TChatRoomColumn> getRoomColumnList() {
		return roomColumnList;
	}

	public void setRoomColumnList(List<TChatRoomColumn> roomColumnList) {
		this.roomColumnList = roomColumnList;
	}

	public Long getRoomId() {
		return roomId;
	}

	public void setRoomId(Long roomId) {
		this.roomId = roomId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public Long getColumnId() {
		return columnId;
	}

	public void setColumnId(Long columnId) {
		this.columnId = columnId;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	@Override
	protected Serializable pkVal() {
		return this.roomId;
	}

}
